
import 'package:ysy_flutter_mvvm_yuanxuan/api/HttpService.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/base/BaseModel.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/base/PullPageBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/base/BaseBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/base/BaseListDataBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/detail/AddCartEntity.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/detail/GoodsDetailsBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/home/HomeAttentionPageBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/home/HomeCategoryTabBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/home/HomeAttentionBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/home/RecommendCategoryBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/home/RecommendGoodsBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/shopcart/ShopingCartBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/helper/ViewHelper.dart';
import '../../../bean/home/HomeContentBean.dart';

class CartShopVM extends BaseModel{

  List<CartShoppingBean> shoppingCartList=[];

  //购物车列表
  void getShoppingCart({bool isDialog=true,RequestDone? requestDone}){
     onNetWorkVerdictAndData(future: cartShoppingList(), result: (str){
         shoppingCartList=BaseToListBean<CartShoppingBean>.fromJson(str,(map) => CartShoppingBean.fromJson(map)).getData;
     },isDialog:isDialog,done: requestDone);
  }

}